package com.cb.web.wasf.sample.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;

/**
 * @author CBO
 */
@Entity
public class ProfilBO implements Serializable {

    @Id
    private String name;
    private String description;
    @ManyToMany
    private Set<RoleBO> roles = new HashSet<RoleBO>();
    @ManyToMany(mappedBy="profils")
    private Set<UserBO> users = new HashSet<UserBO>();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Set<RoleBO> getRoles() {
        return roles;
    }

    public void setRoles(Set<RoleBO> roles) {
        this.roles = roles;
    }

    public Set<UserBO> getUsers() {
        return users;
    }

    public void setUsers(Set<UserBO> users) {
        this.users = users;
    }

}
